<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/layout.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>平方网建材网</title>
    <link href="/temp/css/iframe.css" rel="stylesheet" type="text/css" />
    <link href="/temp/css/default.css" rel="stylesheet" type="text/css" />
    <link href="/temp/css/top.css" rel="stylesheet" type="text/css" />
    <link href="/temp/css/right.css" rel="stylesheet" type="text/css" />
    <link href="/temp/css/page.css" rel="stylesheet" type="text/css" />
    <link href="/temp/scripts/jqtransformplugin/jqtransform.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="/common/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/temp/scripts/jqtransformplugin/jquery.jqtransform.js"></script>
    <script src="/common/json2.js" type="text/javascript"></script>
    <script src="/common/jsmart.js" type="text/javascript"></script>
    
    <script src="/temp/scripts/default.js" type="text/javascript"></script>
    <script src="/temp/scripts/urledit.js" type="text/javascript"></script>
    <script src="/temp/scripts/search.js" type="text/javascript"></script>

    <script language="javascript">
        String.prototype.Trim = function () {
            return this.replace(/(^\s*)|(\s*$)/g, "");
        }  
        $(function () {
            $('form').jqTransform({ imgPath: 'img/' });
        });
    </script>
</head>
<body>
    <center>
        <div id="box">
            <div id="top">
                <!-- top_up -->
                <div class="top_up">
                    <div class="fl">
                        <img src="/temp/resources/images/top_up_bs.jpg" width="148" height="24">
                    </div>
                    <div class="fl top_bs_title">
                        <a href="#">旗下网站</a>
                    </div>
                    <div class="fr top_phone">
                        热线电话: 65377007*8007</div>
                </div>
                <!-- top_logo -->
                <div class="nf top_down">
                    <div class="top_left fl">
                        <div class="top_logo_up">
                            <img src="/temp/resources/images/top_logo.png" width="280" height="62" style="cursor: pointer;"
                                onclick="javascript:window.location='/home.html';" title="平方建材网">
                        </div>
                        <div class="top_logo_down">
                        </div>
                        <div class="top_up_hb">
                        </div>
                    </div>
                    <!-- top_main -->
                    <div class="top_main fl">
                        <img src="/temp/resources/images/top_center_bj.png" width="289" height="178" border="0" usemap="#Map"
                            class="ok_img">
                        <map name="Map" id="Map">
                            <area shape="rect" coords="19,73,78,93" href="#" onclick="sethome(this, window.location)"
                                title="设为首页">
                            <area shape="rect" coords="42,30,99,48" href="#" title="会员区">
                            <area shape="rect" coords="110,3,151,17" href="help.html" title="帮助">
                            <area shape="rect" coords="200,32,259,50" href="#" onclick="window.external.addFavorite('http://www.m2.com.cn','平方建材网');"
                                title="添加收藏">
                            <area shape="rect" coords="231,72,285,89" href="home.html" title="返回主页">
                        </map>
                    </div>
                    <!-- top_right -->
                    <div class="top_right fr">
                        <!-- top_right_username -->
                        <div class="top_right_yh">
                            <div class="top_right_yh">
                                <div class="quit fr">
                                    <div class="fl dl">
                                        <a style="_line-height: 18px; font-size: 13px;" href="login.html" target="_blank"
                                            id="urllogin">登录</a></div>
                                    <div class="fl zc">
                                        <a style="_line-height: 18px; font-size: 13px;" href="#">注册</a></div>
                                </div>
                                <div class="welcome fr not_login" style="font-size: 13px; color: #00A0C6;">
                                    你还未登录</div>
                            </div>
                        </div>
                        <!-- top_right_search -->
                        <div class="nf top_right_search">
                            <div>
                                <form>
                                <div class="jqTransformSelectWrappere">
                                        <select id="mainsearchtype">
                                            <option value="建材">建材</option>
                                            <option value="供应商">供应商</option>
                                        </select>
                                </div>
                                </form>
                                <div class="fl sousuo_wbk">
                                    <input name="" type="text" style="" class="top_wbk ui-autocomplete-input" id="mainsearchinput"
                                        autocomplete="off" role="textbox" aria-autocomplete="list" aria-haspopup="true"></div>
                                <div class="fl an">
                                    <a href="#" id="mainsearch" onclick="topsearch()">快速搜索</a></div>
                            </div>
                        </div>
                        <div class="nf gjz">
                            <ul>
                                <li style="color: #8F9193">关键字</li>
                            </ul>
                        </div>
                    </div>
                    <div class="nf">
                    </div>
                    <!-- top_menu -->
                    <div class="nf top_menu">
                        <div class="top_menu_center">
                            <ul>
                                <li>
                                    <div class="lx fl">
                                    </div>
                                    <div class="fl dh">
                                        <a href="/temp/home.html">首页</a></div>
                                </li>
                                <li>
                                    <div class="lx fl">
                                    </div>
                                    <div class="fl dh">
                                        <a href="/temp/categorylist.html">材料信息</a></div>
                                </li>
                                <li>
                                    <div class="lx fl">
                                    </div>
                                    <div class="fl dh">
                                        <a href="/temp/search/supplier.html">厂商信息</a></div>
                                </li>
                                <li>
                                    <div class="lx fl">
                                    </div>
                                    <div class="fl dh">
                                        <a href="#">无忧询价</a></div>
                                </li>
                                <li>
                                    <div class="lx fl">
                                    </div>
                                    <div class="fl dh">
                                        <a href="#">快递查询</a></div>
                                </li>
                                <li>
                                    <div class="lx fl">
                                    </div>
                                    <div class="fl dh">
                                        <a href="#" id="specialmenu"></a>
                                    </div>
                                </li>
                            </ul>
                        </div>
                        <div class="top_up_zh">
                        </div>
                    </div>
                </div>
            </div>
            <!-- InstanceBeginEditable name="EditMain" -->     
            <link href="/temp/css/gysqy.css" rel="stylesheet" type="text/css" />      
            <div id="main">
                <!-- main_left -->
                <div id="left" class="fl">
                	<!--材料搜索框-->
                    <div>
                        <div class="gys">
                                 <div class="gys_textbox fl"><input name="" type="text" class="gys_wbk" id="keyM"></div>
                                  <div class="fl"><a class="btnManufacturerSearch1" onclick="suppliersearch()"><img src="/temp/resources/images/gys/cz_an.jpg" width="100" height="33" border="0"></a></div>
                                   <div class="nf gjz"> 
                                        <ul>
                                            <li><b>热门关键字</b></li>
                                        </ul>
                                   </div>
                   		</div>    
                    </div>
                    
                    <!--供应商搜索结果-->
                    <div>
                        <div class="gysqy">
                            <div class="gysqy_title">
                                <div class="fl gys_name">
                                    供应商</div>
                                <div class="fl record" id="countinfo">
                                    </div>
                            </div>
                            <div class="gysqy_lb">
                                <ul id="supplierlist">

                                </ul>
                            </div>
                        </div>                        
                    </div>
                    <!--分页-->
                    <div id="pagelist">
                        
                	</div>
                </div>
                <div id="right" class="fl">
                    <iframe allowtransparency="true" src="/temp/partial/recsupplierads.html" frameborder="0" id="txqy_iframe"
                        scrolling="no"></iframe>
                </div>
            </div>			
            
             <!--供应商搜索结果列表-->
            <script id="supplier" type="text/x-jsmart-tmpl">
				{foreach $result.hits.hits as $j => $supplier}
                	<li>
						<div class="fl gysqy_lb_tp">
							<img src="/temp/resources/images/gys/gysqy_pic01.jpg" width="122" height="120">
						</div>
						<div class="fl gysqy_lb_nr">
							<div class="gysqy_lb_title">
								<a style="_line-height: 18px;" href="{returnidurl('supplierinfo.html',$supplier._id)}" title="{$supplier._id}" target="_blank">{$supplier._id}</a>
							</div>
							<div class="gysqy_lb_wz">
							</div>
							<div class="gysqy_lb_lx" title="类型：销售商  主营产品: {$supplier._source.mainproduct}">
								类型：销售商 主营产品: {$supplier._source.mainproduct}
							</div>
							<div class="gysqy_lb_dz">
								地址：{$supplier._source.address}
							</div>
						</div>
						<div class="fl gysqy_lb_an">
							<a href="{returnidurl('supplierinfo.html',$supplier._id)}" title="{$supplier._id}" target="_blank">
								<img src="/temp/resources/images/lxsj.png" width="92" height="28" border="0">
							</a>
						</div>
                    </li>
				{/foreach}				
            </script>
            
            <script>
				var current = $(".top_menu_center ul li")[2].children[1].children[0];
				$(current).addClass("current hasCurrent");
				
				$(document).ready(
					function(){
						var myurl=new UrlEdit.URL(document.URL);		
						if(myurl.get("pageIndex") != undefined && myurl.get("pageIndex") != "")
							currentpage = myurl.get("pageIndex");
						if(myurl.get("pagesize") != undefined && myurl.get("pagesize") != "")
							pagesize = myurl.get("pagesize");
							
						if(myurl.get("keyword") != undefined && myurl.get("keyword") != "")
							keyword = myurl.get("keyword");				
							
						$("#keyM").attr("value", decodeURI(keyword));					
						var skip = pagesize * (currentpage - 1);
						var pageparam = "?from=" + skip + "&size=" + pagesize + "&keyword=" + keyword;		
						
						$.ajax({
							type: "GET",
							url: searchsupplier + pageparam,
							dataType: "jsonp",
							jsonp:"jsonpcallback",
							success:function(data, status){
								buildPage(data.result.hits.total);	
								buildSearchCount(data);								
								
								var tpl = new jSmart(document.getElementById('supplier').innerHTML);
								var res = tpl.fetch(data);
								$("#supplierlist").html(res);
						    }
						})
					}
				);
			</script>
            
			<!-- InstanceEndEditable -->
            <script id="page" type="text/x-jsmart-tmpl">
				<div class="page">
					<div class="pagination">
						{if $pagecount > 1}			
							<a class="pageNum"><b>
							{$currentpage}
							</b>/<b>
							{$pagecount}
							</b></a>	
							{if (1 != $currentpage)}
								<a href="{urlset('pageIndex', 1)}" class="first">首页</a>
								<a href="{urlset('pageIndex', $currentpage-1)}" class="prev">上一页</a>
							{/if}	
							
							{for $i=$start to $end}
								{if ($i == $currentpage)}
									<span class="current">{$i}</span>
								{else}
									<a href="{urlset('pageIndex', $i)}">{$i}</a>
								{/if}
							{/for}
							
							{if ($pagecount != $currentpage)}
								<a href="{urlset('pageIndex', $currentpage+1)}" class="first">下一页</a>
								<a href="{urlset('pageIndex', $pagecount)}" class="last">尾页</a>
							{/if}	
						{/if}
					</div>
				</div>
			</script>            
            <script id="count" type="text/x-jsmart-tmpl">
			共 {$rows.length} 条记录
			</script>    
            <script id="searchcount" type="text/x-jsmart-tmpl">
			共 {$result.hits.total} 条记录
			</script>
            <div class="nf">
            <iframe allowtransparency="true" src="/temp/partial/bottom.html" frameborder="0" id="bottom_iframe" scrolling="no"></iframe>
            </div>
        </div>
    </center>
</body>
<!-- InstanceEnd --></html>
